package com.jake.rabbitbootdemo.controller;

import com.jake.rabbitbootdemo.producer.FanoutProducer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("fanout")
public class FanoutController {

    @Autowired
    private FanoutProducer fanoutProducer;

    @RequestMapping("produce")
    public void produce(String msg) {
        fanoutProducer.send(msg);
    }

}
